﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
  
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Harmony 2.0 </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Harmony 2.0 ">
    <meta name="generator" content="docfx 2.51.0.0">
    
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="styles/docfx.vendor.css">
    <link rel="stylesheet" href="styles/docfx.css">
    <link rel="stylesheet" href="styles/main.css">
    <meta property="docfx:navrel" content="toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    
    
    
  </head>
  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>
        
        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              
              <a class="navbar-brand" href="index.html">
                <img id="logo" class="svg" src="logo.svg" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>
        
        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div role="main" class="container body-content hide-when-search">
        <div class="article row grid">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="">

<p align="center"><img src="https://raw.githubusercontent.com/pardeike/Harmony/master/HarmonyLogo.png" alt="Harmony" width="128"></p>
<h1 id="harmony-20">Harmony 2.0</h1>
<h2 id="introduction">Introduction</h2>
<p>Harmony gives you an elegant and high level way to <strong>alter functionality</strong> in applications written in C#. It does this at <strong>runtime</strong> by monkey patching methods unlike other solutions that change the content of dll files.</p>
<p>It supports <strong>Mono</strong> and <strong>.NET</strong> environments on Windows, Unix and macOS except when Unity uses the stripped down NetStandard profile (.NET 4.x profile works fine). Harmony is used in mainstream Unity games and many other applications.</p>
<p>Designed to be used by multiple users (usually called Mods) that would otherwise override each others hooks, it was originally created for the game <a href="https://rimworldgame.com">RimWorld</a> and its large modding community by <a href="https://www.patreon.com/pardeike">Andreas Pardeike</a>.</p>
<p>Enjoy!<br>
/Andreas Pardeike</p>
<h1 id="getting-started">Getting Started</h1>
<p>Installation is usually done by copying and referencing <a href="https://github.com/pardeike/Harmony/releases">0Harmony.dll</a> from your project or by using the <a href="https://www.nuget.org/packages/Lib.Harmony">Lib.Harmony</a> nuget package.</p>
<h1 id="documentation">Documentation</h1>
<p>You can learn more about Harmony by using the top menu links. The main section [<a href="articles/intro.html">Harmony</a>] brings you to the full documentation that explains everything about Harmony and gives you lots of high level examples. In the second section [<a href="api/index.html">API Documentation</a>] you can browse the public API and all its methods and classes.</p>
<p>If you find a factual error or if you have feedback about the documentation you are welcome to</p>
<ul>
<li>fork the repository and create a pull request</li>
<li>file a documentation Issue on the repo</li>
<li>or write about it on the official discord</li>
</ul>
<h2 id="community">Community</h2>
<p>If you feel stuck or have questions that this site does not answer, feel free to join the official <a href="https://discord.gg/xXgghXR">Discord Server</a> or file a <a href="https://github.com/pardeike/Harmony/issues">GitHub Issue</a>.</p>
<p>Help by promoting this library so other developers can find it. One way is to upvote <a href="https://stackoverflow.com/questions/7299097/dynamically-replace-the-contents-of-a-c-sharp-method/42043003#42043003">this stackoverflow answer</a>. Or spread the word in your developer communities. Thank you!</p>
<h1 id="contact">Contact</h1>
<p>Andreas Pardeike<br>
andreas@pardeike.net<br>
twitter: @pardeike</p>
<h2 id="donations">Donations</h2>
<p>Donations keep me going:<br>
<a href="https://www.patreon.com/pardeike">https://www.patreon.com/pardeike</a></p>
</article>
          </div>
          
          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <div class="contribution">
                <ul class="nav">
                  <li>
                    <a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Documentation/index.md/#L1" class="contribution-link">Improve this Doc</a>
                  </li>
                </ul>
              </div>
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
              <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
              </nav>
            </div>
          </div>
        </div>
      </div>
      
      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
            
            <span>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>
    
    <script type="text/javascript" src="styles/docfx.vendor.js"></script>
    <script type="text/javascript" src="styles/docfx.js"></script>
    <script type="text/javascript" src="styles/main.js"></script>
  </body>
</html>
